﻿using Microsoft.Xna.Framework;

namespace Syngine.Input.Mouse
{
	/// <summary>
	/// 
	/// </summary>
	public static class InputActoinMarqueeExtensions
	{
		/// <summary>
		/// Determines if the given bounds are within the Marquee's bounds.
		/// </summary>
		/// <param name="action"></param>
		/// <param name="bounds"></param>
		/// <returns>true, if the Marquee contains the bounds; false, otherwise.</returns>
		public static bool IsSelected(this IInputContext action, Rectangle bounds)
		{
			var state = action.Current.MarqueeState;
			return state.IsDragging && state.Contains(bounds);
		}
	}
}
